package common;

import java.io.Serializable;
import java.util.Date;

public class StudentExam implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8948121248358829999L;
	private ExamExecution exam;
	private Question[] questions;
	private StudentAnswer[] answers;
	private int StudentId;
	private Date timeStarted;
	private Date timeFinished;
	private int grade;
	private String notes;
	private boolean isCheater;
	private boolean isApproved;
	
	/**
	 * Exam execution getter
	 * @return
	 */
	public ExamExecution getExam() {
		return exam;
	}
	
	/**
	 * Exam execution setter
	 * @param exam Exam execution
	 */
	public void setExam(ExamExecution exam) {
		this.exam = exam;
	}
	
	/**
	 * Exam questions getter
	 * @return Exams questions array
	 */
	public Question[] getQuestions() {
		return questions;
	}
	
	/**
	 * Exam questions setter
	 * @param questions Exams questions array
	 */
	public void setQuestions(Question[] questions) {
		this.questions = questions;
	}
	
	/**
	 * Student Answers getter
	 * @return Student answers array
	 */
	public StudentAnswer[] getAnswers() {
		return answers;
	}
	
	/**
	 * Student Answers setter
	 * @param answers Student answers array
	 */
	public void setAnswers(StudentAnswer[] answers) {
		this.answers = answers;
	}

	/**
	 * Student Id getter
	 * @return Student Id
	 */
	public int getStudentId() {
		return StudentId;
	}

	/**
	 * Student Id setter
	 * @param studentId
	 */
	public void setStudentId(int studentId) {
		StudentId = studentId;
	}

	/**
	 * Started time getter
	 * @return Time started
	 */
	public Date getTimeStarted() {
		return timeStarted;
	}

	/**
	 * Started time setter
	 * @param timeStarted Time started
	 */
	public void setTimeStarted(Date timeStarted) {
		this.timeStarted = timeStarted;
	}

	/**
	 * Finished time getter
	 * @return Time finished
	 */
	public Date getTimeFinished() {
		return timeFinished;
	}

	/**
	 * Finished time setter
	 * @param timeFinished Time finished
	 */
	public void setTimeFinished(Date timeFinished) {
		this.timeFinished = timeFinished;
	}

	/**
	 * Grade getter
	 * @return Exam Grade
	 */
	public int getGrade() {
		return grade;
	}

	/**
	 * Grade setter
	 * @param grade Exam Grade
	 */
	public void setGrade(int grade) {
		this.grade = grade;
	}

	/**
	 * Notes getter
	 * @return Notes
	 */
	public String getNotes() {
		return notes;
	}

	/**
	 * Notes setter
	 * @param notes Notes
	 */
	public void setNotes(String notes) {
		this.notes = notes;
	}

	/**
	 * Cheating flag getter
	 * @return Has the same errors as other exams
	 */
	public boolean isCheater() {
		return isCheater;
	}

	/**
	 * Cheating flag setter
	 * @param isCheater Has the same errors as other exams
	 */
	public void setCheater(boolean isCheater) {
		this.isCheater = isCheater;
	}

	/**
	 * Exam approved flag getter
	 * @return If exam was checked by teacher and approved
	 */
	public boolean isApproved() {
		return isApproved;
	}

	/**
	 * Exam approved flag setter
	 * @param isApproved If exam was checked by teacher and approved
	 */
	public void setApproved(boolean isApproved) {
		this.isApproved = isApproved;
	}

}
